<template>
    <Aside />
    <section id="cards-wrap">
        <div class="cards">
            <div class="card" v-for="item in this.$store.state.mainData" :key="item.index">
                <img class="card-logo" :src="item.img" />
                <div class="card-info">
                    <h3>{{ item.title }}</h3>
                    <p>{{ item.desc }}</p>
                </div>
            </div>
        </div>
    </section>
</template>

<script>
import router from '../router'
import Aside from './Aside.vue'
export default {
    components: {
        Aside,
    },
}
</script>

<style lang="scss">
#cards-wrap {
    flex: 9;
    .cards {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        .card {
            display: flex;
            align-items: center;
            background-color: #fff;
            width: 20%;
            padding: 1rem;
            margin: 1rem;
            border-radius: 3px;
            .card-logo {
                width: 30px;
                height: 30px;
                margin-right: 10px;
            }
            .card-info {
                width: 90%;
                h3 {
                    font-size: 14px;
                    text-align: left;
                }
                p {
                    font-size: 12px;
                    color: #888ea2;
                    white-space: nowrap;
                    text-overflow: ellipsis;
                    overflow: hidden;
                    width: 100%;
                    line-height: 1.8;
                    text-align: left;
                }
            }
        }
    }
}
</style>
